import request from "@/utils/request";

/**
 * @description 详情
 * @param id
 * @returns {*}
 */
export function detail(id){
    return request({
        url:'/disaster/getDisasterById',
        method:'GET',
        params:{id}
    })
}
/**
 * @description 分发
 * @param params
 * @returns {*}
 */
export function allocationApi(params){
    return request({
        url:'/disaster/allocation',
        method:'GET',
        params
    })
}
/**
 * @description 单位管理员列表
 * @param params
 * @returns {*}
 */
export function list1(params){
    return request({
        url:'/UnitsManager/getUnitsManagerList',
        method:'GET',
        params
    })
}
/**
 * @description 列表
 * @param params
 * @returns {*}
 */
export function list(params){
    return request({
        url:'/disaster/getDisasterList',
        method:'GET',
        params
    })
}
/**
 * @description 更新状态
 * @param id
 * @param status
 * @returns {*}
 */
export function updateStatus(id,status){
    return request({
        url:'/statusDemo',
        method:'GET',
        params:{id,status}
    })
}
/**
 * @description 删除
 * @param id
 * @returns {*}
 */
export function deleteRow(id){
    return request({
        url:'/disaster/delDisaster',
        method:'GET',
        params:{id}
    })
}
/**
 * @description 新增/编辑
 * @param data
 * @returns {*}
 */
export function save(data){
    return request({
        url:'/disaster/addAndUpdateDisaster',
        method:'POST',
        data
    })
}
/**
 * @description 新增和修改报灾处理
 * @param data
 * @returns {*}
 */
export function save1(data){
    return request({
        url:'/handle/addAndUpdateHandle',
        method:'POST',
        data
    })
}
/**
 * @description 类型
 * @param params
 * @returns {*}
 */
export function getTypeListApi(params){
    return request({
        url:'/disaster/getDisasterType',
        method:'GET',
        params
    })
}

export function save2(data){
    return request({
        url:'/claimsSettlement/save',
        method:'POST',
        data
    })
}
export function detail2(id){
    return request({
        url:'/claimsSettlement/detail',
        method:'GET',
        params:{id}
    })
}
export function uploadImg(data) {
    return request({
        url: '/file/uploadToLocal',
        method: 'post',
        data
    })
}
